
    /********************************************************/
    /*                                                      */
    /*                                                      */
    /*         Copyright (C), 1993  SEIKO EPSON Corp.       */
    /*         ALL RIGHTS RESERVED                          */
    /*                                                      */
    /*                                                      */
    /*  file name : atol.c                                  */
    /*                                                      */
    /*  Revision history                                    */
    /*      93/12/17    first release       S.Akaiwa        */
    /*      97/2/20	modified	    T.Katahira	    */
    /*			change function declaration	    */
    /*					to the ANSI style   */
    /*                                                      */
    /********************************************************/

#ifdef      UNIX
#include    "stdlib.h"
#else
#include    <stdlib.h>
#endif

long
atol(const char * sStrPtrP)

    /********************************************************/
    /*                                                      */
    /*  The atol function converts string pointed to by     */
    /*  sStrPtrP into long.                                 */
    /*  The atol function returns the converted value.      */
    /*  If nothing is converted, 0 is returns.              */
    /*  LONG_MAX or LONG_MIN is returned, and ERANGE is     */
    /*  stored in errno when overflow is generated.         */
    /*                                                      */
    /*  RETURN  LONG_MAX/LONG_MIN (errno == ERANGE)         */
    /*                  ... Overflow                        */
    /*          Others  ... Converted value                 */
    /*                                                      */
    /********************************************************/

    /* char            * sStrPtrP;          string pointer */ 
    {

           /* converts string into long use strtol function */ 
     return (long)strtol(sStrPtrP, NULL, 10);

    }

